package com.example.role.dao;

import com.example.role.pojo.Office;
import org.apache.ibatis.annotations.*;

@Mapper
public interface OfficeDao {

    @Insert("insert into `em_office`(office_id,office_name)values(#{officeId},#{officeName})")
    public int addOffice(Office office);

    @Select("select * from `em_office` where office_id=#{officeId}")
    public Office getOfficeById(String id);

    @Delete("delete from `em_office` where office_id=#{officeId}")
    public int deleteOffice(String id);


    @Update("update `em_office` set office_name =#{officeName} where id=#{id}")
    public int updateOffice(Office office);
}
